package com.cooqe.collection_jdbc.jdbcfinder;

import com.alibaba.fastjson.JSONObject;
import com.cooqe.basefinder.AbstractBaseFinder;
import com.cooqe.entity.ItMetric;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2023/11/14-2023
 * @Description: 这里用一句话描述这个类的作用
 */
@Component
@Slf4j
public class JdbcFinderJob extends AbstractBaseFinder {

    @Override
    //@XxlJob("snmpFinderJob")
    public void schedulingExecute(String params) {
        super.schedulingExecute(params);
    }

    @Override
    public void beforeCollection(JSONObject jsonObject) {
        HikariConfig config = new HikariConfig();
        config.setJdbcUrl("jdbc:mysql://localhost:3306/mydatabase");
        config.setUsername("username");
        config.setPassword("password");
        HikariDataSource dataSource = new HikariDataSource(config);
    }

    @Override
    public void doCollection(List<ItMetric> metricList) {

    }
}